﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace KeYan.Service.Common.Enum
{
    public class Resilt<T>
    {
        public ResultStatus State { get; set; }//状态码
        public string Msg { get; set; }//成功或者失败
        public T Data { get; set; }//返回数据
        public static Resilt<T> Error(T t, Exception ex, ResultStatus resStatus = ResultStatus.Error)
        {
            return new Resilt<T>() { Data = t, Msg = ex.Message, State = resStatus };
        }

    }
}
